/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package cn.icanci.coupon.error;

import cn.icanci.basic.error.IErrorCode;

/**
 * @author icanci
 * @date Created in 2021/05/01 10:15
 * @version 1.0
 */
public enum CouponError implements IErrorCode {
                                               /**
                                                * 优惠券不存在
                                                */
                                               COUPON_NOT_EXIST("COUPON.COUPON_NOT_EXIST", "优惠券不存在"),
                                               /**
                                                * 优惠券已有人领取,只允许上下架，不允许删除/更新操作
                                                */
                                               COUPON_HAS_RECORDS("COUPON.COUPON_HAS_RECORDS", "优惠券已有人领取,只允许上下架，不允许删除/更新操作"),
                                               /**
                                                * 优惠券错误
                                                */
                                               COUPON_ERROR("COUPON.COUPON_ERROR", "优惠券错误"),
                                               /**
                                                * 优惠券过期了
                                                */
                                               COUPON_RECORD_EXPIRED("COUPON.COUPON_RECORD_EXPIRED", "优惠券过期了"),
                                               /**
                                                * 优惠券条件不满足
                                                */
                                               COUPON_CONDITION_FAIL("COUPON.COUPON_CONDITION_FAIL", "优惠券条件不满足"),
                                               /**
                                                * 优惠券记录不存在
                                                */
                                               COUPON_RECORD_NOT_EXIST("COUPON.COUPON_RECORD_NOT_EXIST", "优惠券记录不存在"),
                                               /**
                                                * 优惠券已使用
                                                */
                                               COUPON_RECORD_USED("COUPON.COUPON_RECORD_USED", "优惠券已使用"),
                                               /**
                                                * 优惠券已领取
                                                */
                                               COUPON_RECORD_EXIST("COUPON.COUPON_RECORD_EXIST", "优惠券已领取"),
                                               /**
                                                * 优惠券不足
                                                */
                                               COUPON_NOT_ENOUGH("COUPON.COUPON_NOT_ENOUGH", "优惠券不足"),
                                               /**
                                                * 优惠券暂未开始领取
                                                */
                                               COUPON_NOT_START("COUPON.COUPON_NOT_START", "优惠券暂未开始领取"),
                                               /**
                                                * 优惠券领取时间已结束
                                                */
                                               COUPON_IS_EXPIRED("COUPON.COUPON_IS_EXPIRED", "优惠券领取时间已结束"),
                                               /**
                                                * 优惠类型不支持
                                                */
                                               COUPON_TYPE_NOT_SUPPORT("COUPON.COUPON_TYPE_NOT_SUPPORT", "优惠类型不支持");

    private String code;
    private String desc;

    CouponError(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    /**
     * 返回错误编码
     *
     * @return
     */
    @Override
    public String getCode() {
        return null;
    }

    /**
     * 返回错误描述
     *
     * @return
     */
    @Override
    public String getDesc() {
        return null;
    }
}
